/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pyfntbactcreq")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pyfntbactcreq.findAll", query = "SELECT p FROM Pyfntbactcreq p"),
    @NamedQuery(name = "Pyfntbactcreq.findByPyfntbactcreqid", query = "SELECT p FROM Pyfntbactcreq p WHERE p.pyfntbactcreqid = :pyfntbactcreqid")})
public class Pyfntbactcreq implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pyfntbactcreqid")
    private Integer pyfntbactcreqid;
    @JoinColumn(name = "pytctbactcompid", referencedColumnName = "pytctbactcompid")
    @ManyToOne(optional = false)
    private Pytctbactcomp pytctbactcompid;
    @JoinColumn(name = "pyfntbrequerid", referencedColumnName = "pyfntbrequerid")
    @ManyToOne(optional = false)
    private Pyfntbrequer pyfntbrequerid;

    public Pyfntbactcreq() {
    }

    public Pyfntbactcreq(Integer pyfntbactcreqid) {
        this.pyfntbactcreqid = pyfntbactcreqid;
    }

    public Integer getPyfntbactcreqid() {
        return pyfntbactcreqid;
    }

    public void setPyfntbactcreqid(Integer pyfntbactcreqid) {
        this.pyfntbactcreqid = pyfntbactcreqid;
    }

    public Pytctbactcomp getPytctbactcompid() {
        return pytctbactcompid;
    }

    public void setPytctbactcompid(Pytctbactcomp pytctbactcompid) {
        this.pytctbactcompid = pytctbactcompid;
    }

    public Pyfntbrequer getPyfntbrequerid() {
        return pyfntbrequerid;
    }

    public void setPyfntbrequerid(Pyfntbrequer pyfntbrequerid) {
        this.pyfntbrequerid = pyfntbrequerid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pyfntbactcreqid != null ? pyfntbactcreqid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pyfntbactcreq)) {
            return false;
        }
        Pyfntbactcreq other = (Pyfntbactcreq) object;
        if ((this.pyfntbactcreqid == null && other.pyfntbactcreqid != null) || (this.pyfntbactcreqid != null && !this.pyfntbactcreqid.equals(other.pyfntbactcreqid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pyfntbactcreq[ pyfntbactcreqid=" + pyfntbactcreqid + " ]";
    }
    
}
